package com.wxit.threadlocal.hashcode;

public class TestHashCode {
    public static void main(String[] args) {
        //-XX:+UnlockExperimentalVMOptions -XX:hashCode=2
        Object o1 = new Object(); //hashcode不存在
        Object o2 = new Object();
        Object o3 = new Object();

        System.out.println(Integer.toHexString(o1.hashCode())); //第一次调用  采用随机数  存入markword
        System.out.println(Integer.toHexString(o2.hashCode()));
        System.out.println(Integer.toHexString(o3.hashCode()));
    }
}
